using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

public class xuanguan : MonoBehaviour
{
    public Image shuzhu;
    private int guanka;
    public Text text;
    // Start is called before the first frame update
    void Start()
    {
        guanka = 1;
        text.text = "level" + guanka.ToString();
        DontDestroyOnLoad(this.gameObject);
    }

    // Update is called once per frame
    void Update()
    {
        
    }
    public void PressSelection()
    {
        SceneManager.LoadScene("testScens1 " + guanka.ToString());
    }
    public void leftright(int i)
    {
        if (i == 0)
        {
            if (guanka > 1)
            {
                guanka -= 1;
                text.text = "level" + guanka.ToString();
            }
        }
        else
        {
            if (guanka < 5)
            {
                guanka += 1;
                text.text = "level" + guanka.ToString();
            }
        }

    }
}